package com.easyexcell.easyexcellexample.dto;

import com.easyexcell.easyexcellexample.utils.esayexcell.bo.QuotationRecordDetailedExportBo_Test;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 报价物明细
 *
 * @author c.c
 * @Since 2023/6/6
 * @Time 19:18
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class QuotationRecordDetailedExportDto {

  /**
   * 标的物名字
   **/
  private String planItemId;

  /**
   * 标的物名字
   **/
  private String name;

  /**
   * 标的物编码
   **/
  private String code;

  /**
   * 品目名称
   **/
  private String categoryName;

  /**
   * 品目编码
   **/
  private String categoryCode;

  /**
   * 规格型号
   **/
  private String specification;


  /**
   * 采购数量
   **/
  private Double procurementQuantity;

  /**
   * 计量单位
   **/
  private String unit;

  /**
   * 描述
   **/
  private String remark;

  /**
   * 税率
   **/
  private Double taxRate;

  /**
   * 不含税单价
   **/
  private Double noTaxUnitPrice;

  /**
   * 不含税合价
   **/
  private Double noTaxAllPrice;

  /**
   * 含税单价
   **/
  private Double taxUnitPrice;

  /**
   * 含税单价
   **/
  private Double taxAllPrice;

  /**
   * 总报价
   **/
  private Double currentPrice;


  public static QuotationRecordDetailedExportBo_Test convertToQuotationRecordDetailedExportBo_Test(QuotationRecordDetailedExportDto item) {
    if (item == null) {
      return null;
    }
    QuotationRecordDetailedExportBo_Test result = new QuotationRecordDetailedExportBo_Test();
    result.setName(item.getName());
    result.setCode(item.getCode());
    result.setCategoryName(item.getCategoryName());
    result.setCategoryCode(item.getCategoryCode());
    result.setSpecification(item.getSpecification());
    result.setProcurementQuantity(item.getProcurementQuantity());
    result.setUnit(item.getUnit());
    result.setTaxUnitPrice(item.getTaxUnitPrice());
    result.setTaxRate(item.getTaxRate());
    result.setTaxAllPrice(String.valueOf(item.getTaxAllPrice()));
    result.setNoTaxUnitPrice(String.valueOf(item.getNoTaxUnitPrice()));
    result.setNoTaxAllPrice(String.valueOf(item.getTaxAllPrice()));
    result.setRemark(item.getRemark());
    return result;
  }
}
